import tools from "@/common/tools.js";
import {
	post
} from '@/common/axios.js';
import {
	invitationSetting ,//邀请奖励设置
} from '@/common/path.js'
export default {
	//用户照片操纵
	namespaced: true,
	state: {
		userInfo: uni.getStorageSync('userInfo'),
		shareRewardList:[],//分享奖励设置
	},
	getters: {

	},
	mutations: {
		SET_SHARE_LIST(state, data) { //分享奖励设置
			state.shareRewardList = data
		},
	},
	actions: {
		//查询邀请奖励
		invitationSetting({
			dispatch,
			commit,
			state
		}, args={}) {
			post(invitationSetting, args).then(res => {
				if (res.code == 0) {
					commit('SET_SHARE_LIST', res.data)
				} else {
					commit('SET_SHARE_LIST', [])
				}
			})
		}


	},
}
